package com.nifostasky.comic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nifostasky.comic.mapper.CoDetailedInfoMapper;
import com.nifostasky.comic.entitys.CoDetailedInfo;
import com.nifostasky.comic.mapper.CoDetailedInfoMapper;
import com.nifostasky.comic.service.CoDetailedInfoService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 漫画详细信息表
 * (CoDetailedInfo)表服务实现类
 *
 * @author makejava
 * @since 2022-02-13 15:01:32
 */
@Service("coDetailedInfoService")
public class CoDetailedInfoServiceImpl extends ServiceImpl<CoDetailedInfoMapper, CoDetailedInfo> implements CoDetailedInfoService {

    @Override
    public List<CoDetailedInfo> queryCoDetailedInfoByIds(List<Long> ids) {
        if (CollectionUtils.isEmpty(ids)) return new ArrayList<>();
        List<CoDetailedInfo> list = this.list(new QueryWrapper<CoDetailedInfo>().lambda()
                .in(CoDetailedInfo::getId, ids)
        );
        return list;
    }
}